home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ Explorer Drive Hide.xpl < prev    next >
Text File  |  1999-06-25  |  2KB  |  97 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="5"
  4. "UIPATH"="Appearance\Explorer\Options"
  5. "NAME"="Hide Drives"
  6. "VERSION"="1.2"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Hide A:\ + B:\"
  9. "TEXT 2"="Hide drive C:\"
  10. "TEXT 3"="Hide drive D:\"
  11. "TEXT 4"="Hide drive E:\"
  12. "TEXT 5"="Hide drive F:\"
  13. "DESCRIPTION 1"="Maybe you don't want that all drives are visible inside the Windows Explorer."
  14. "DESCRIPTION 2"="In this case, simply select the drives that should be hidden and they won't be visible anymore."
  15. "DESCRIPTION 3"="If you are using Internet Explorer 4.0, you need to restart before the changes are visible."
  16. "AUTHOR"="Xteq Systems"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  19.  
  20.  
  21. sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
  22. sV="NoDrives"
  23. Sub Plugin_Initialize 
  24.  if RegPathExists(sP) then
  25.   i=RegReadValue(sP&sV)
  26.  
  27.   if IsEmpty(i)=true or i=0 then
  28.    'No drives hiden
  29.   else
  30.    'Arg! We got to calculate!!!
  31.    if (i-32)>=0 then
  32.     Call SetUIElement(5,true)
  33.     i=i-32
  34.    end if
  35.  
  36.    if (i-16)>=0 then
  37.     Call SetUIElement(4,true)
  38.     i=i-16
  39.    end if
  40.  
  41.    if (i-8)>=0 then
  42.     Call SetUIElement(3,true)
  43.     i=i-8
  44.    end if
  45.  
  46.    if (i-4)>=0 then
  47.     Call SetUIElement(2,true)
  48.     i=i-4
  49.    end if
  50.  
  51.    if (i-3)>=0 then
  52.     Call SetUIElement(1,true)
  53.    end if
  54.  
  55.     
  56.   end if
  57.  else
  58.   Disable
  59.  end if
  60.  
  61. End Sub
  62.  
  63. Sub Plugin_CheckData(ElementIndex)
  64. End Sub
  65.  
  66. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  67.  i=0
  68.  
  69.  if GetUIElement(1)=true then
  70.   i=i+1+2 'hide B also!
  71.  end if
  72.  
  73.  if GetUIElement(2)=true then
  74.   i=i+4
  75.  end if
  76.  
  77.  if GetUIElement(3)=true then
  78.   i=i+8
  79.  end if
  80.  
  81.  if GetUIElement(4)=true then
  82.   i=i+16
  83.  end if
  84.  
  85.  if GetUIElement(5)=true then
  86.   i=i+32
  87.  end if
  88.  
  89.  Call RegWriteValue(sP & sV,i,2)
  90.  
  91.  'Not needed?
  92.  'Restart
  93. End Sub
  94.  
  95. Sub Plugin_Terminate 
  96. End Sub
  97.